Skip to content

Update SearchIteratorV2.java#1681

Closed
wlqyyyyy wants to merge 2 commits intomilvus-io:masterfrom
wlqyyyyy:patch-1
Closed

Update SearchIteratorV2.java#1681
wlqyyyyy wants to merge 2 commits intomilvus-io:masterfrom
wlqyyyyy:patch-1

Conversation

@wlqyyyyy
Copy link
Copy Markdown

When the final query result is less than batch size, an error will be reported with the exception java. lang. IndexOutOfBoundsException: toIndex=1000

When the final query result is less than batch size, an error will be reported with the exception java. lang. IndexOutOfBoundsException: toIndex=1000
@sre-ci-robot
Copy link
Copy Markdown

Welcome @wlqyyyyy! It looks like this is your first PR to milvus-io/milvus-sdk-java 🎉

@wlqyyyyy
Copy link
Copy Markdown
Author

/assign @yelusion2

@yhmo
Copy link
Copy Markdown
Contributor

yhmo commented Nov 19, 2025

The code change could not be compiled:

Error:  /home/runner/work/milvus-sdk-java/milvus-sdk-java/sdk-core/src/main/java/io/milvus/orm/iterator/SearchIteratorV2.java:[189,21] illegal start of expression

It seems the "if" is redundant:

targetLen = if (cache.size() < targetLen)?cache.size():targetLen;

should be

targetLen = (cache.size() < targetLen) ? cache.size() : targetLen;

@sre-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wlqyyyyy
To complete the pull request process, please ask for approval from yelusion2 after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yhmo
Copy link
Copy Markdown
Contributor

yhmo commented Nov 19, 2025

Hi @wlqyyyyy
I have merged your code change to this pr: https://github.com/milvus-io/milvus-sdk-java/pull/1682/files#diff-799ada3067c64276dc6d283c208aa28c99045b0e804d07dd749211b564ec0008
Thank you for bringing this bug to our attention! I will close this pr.

@yhmo yhmo closed this Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants